package com.cq.system.controller;

import com.alibaba.fastjson.JSON;
import com.cq.system.common.NacosConstantConfiguration;
import com.cq.system.entity.TB_User;
import com.cq.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;
    @Autowired
    NacosConstantConfiguration nacosConstantConfiguration;


    @RequestMapping("/getUser")
    public TB_User getUser() {
        System.out.println("配置文件内容------"+ JSON.toJSONString(nacosConstantConfiguration));
        return userService.getById("2");
    }
}